Skip to content

validate repo config when when changes are proposed - #412

Merged
alecbcs merged 4 commits into
llnl:mainfrom
cmelone:add/validate-config-after-change
Aug 22, 2026
Merged

validate repo config when when changes are proposed#412
alecbcs merged 4 commits into
llnl:mainfrom
cmelone:add/validate-config-after-change

Conversation

@cmelone

@cmelone cmelone commented Aug 21, 2026

Copy link
Copy Markdown
Member

Previously, if a repo's Hubcast config was invalid and a dev opened a PR/branch to fix the issue, we'd read from the default branch config and report the old error.

This PR adds the following

  • if hubcast.yml was changed in the branch/PR, validate that config and report the status back to the user
  • report the exception text to users when validation fails
  • add user-friendly parsing to the YAML and pydantic config errors
  • rename the hubcast-error check to hubcast-config to avoid confusion for successful statuses

This change requires an additional API call to check the files changed by a PR.

closes #394

--
examples of new behavior:

Previously, if a repo's Hubcast config was invalid and a dev opened a
PR/branch to fix the issue, we'd read from the default branch config and
report the old error.

This PR adds the following
- if hubcast.yml was changed in the branch/PR, validate that config and
  report the status back to the user
- report the exception text to users when validation fails
- add user-friendly parsing to the YAML and pydantic config errors
- rename the hubcast-error check to hubcast-config to avoid confusion
  for successful statuses

This change requires an additional API call to check the files changed
by a PR.

Signed-off-by: Caetano Melone <melone1@llnl.gov>
@cmelone
cmelone requested a review from alecbcs August 21, 2026 21:35
Signed-off-by: Caetano Melone <melone1@llnl.gov>
Signed-off-by: Caetano Melone <melone1@llnl.gov>
Comment thread src/hubcast/web/github/utils.py Fixed
Signed-off-by: Caetano Melone <melone1@llnl.gov>

@alecbcs alecbcs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @cmelone!

@alecbcs
alecbcs merged commit 2fabe35 into llnl:main Aug 22, 2026
14 checks passed
@cmelone
cmelone deleted the add/validate-config-after-change branch August 22, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perform config validation in PRs that edit hubcast.yml

3 participants